package org.xbzheng.restful_study.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.xbzheng.restful_study.dao.CardDao;
import org.xbzheng.restful_study.model.Card;

import java.util.List;

/**
 * @Created by szheng on 2016/11/1.
 */
@Service
public class CardService {
    @Autowired
    private CardDao cardDao;

    public Card createCard(final Card card){
        return cardDao.createCard(card);
    }

    public List<Card> findCardByRoom(final int roomId){
        return cardDao.findByRoom(roomId);
    }
}
